Overview | Package | Class | Tree | Deprecated | Index | Help |
Java Platform 1.1.7 |
||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.java.swing.table.DefaultTableColumnModel
Warning: serialized objects of this class will not be compatible with future swing releases. The current serialization support is appropriate for short term storage or RMI between Swing1.0 applications. It will not be possible to load serialized Swing1.0 objects with future releases of Swing. The JDK1.2 release of Swing will be the compatibility baseline for the serialized form of Swing objects.
Field Summary | |
ChangeEvent | changeEvent
Change event (only one needed) |
int | columnMargin
Width margin between each column |
boolean | columnSelectionAllowed
Column selection allowed in this column model |
EventListenerList | listenerList
List of TableColumnModelListener |
ListSelectionModel | selectionModel
Model for keeping track of column selections |
java.util.Vector | tableColumns
Array of TableColumn objects in this model |
int | totalColumnWidth
A local cache of the combined width of all columns |
Constructor Summary | |
DefaultTableColumnModel()
|
Method Summary | |
void | addColumn(TableColumn aColumn)
Appends aColumn to the end of the receiver's tableColumns array. |
void | addColumnModelListener(TableColumnModelListener x)
|
ListSelectionModel | createSelectionModel()
|
void | fireColumnAdded(TableColumnModelEvent e)
|
void | fireColumnMarginChanged()
|
void | fireColumnMoved(TableColumnModelEvent e)
|
void | fireColumnRemoved(TableColumnModelEvent e)
|
void | fireColumnSelectionChanged(ListSelectionEvent e)
|
int | getColumnCount()
Returns the number of columns in the receiver's table columns array. |
TableColumn | getColumn(int columnIndex)
Returns the TableColumn object for the column at columnIndex |
int | getColumnIndexAtX(int xPosition)
Returns the index of the column that lies on the xPosition, or -1 if it lies outside the any of the column's bounds. |
int | getColumnIndex(java.lang.Object identifier)
Returns the index of the first column in the receiver's columns array whose identifier is equal to identifier, when compared using equals(). |
int | getColumnMargin()
Returns the width margin for TableColumn. |
java.util.Enumeration | getColumns()
Returns an Enumeration of all the columns in the model |
boolean | getColumnSelectionAllowed()
|
int | getSelectedColumnCount()
|
int[] | getSelectedColumns()
|
ListSelectionModel | getSelectionModel()
Returns the ListSelectionModel that is used to maintain column selection state. |
int | getTotalColumnWidth()
|
void | moveColumn(int columnIndex,
int newIndex)
Moves the column and heading at columnIndex to newIndex. |
void | propertyChange(java.beans.PropertyChangeEvent evt)
|
void | recalcWidthCache()
|
void | removeColumn(TableColumn column)
Deletes the TableColumn column from the receiver's table columns array. |
void | removeColumnModelListener(TableColumnModelListener x)
|
void | setColumnMargin(int newMargin)
Sets the column margin to newMargin. |
void | setColumnSelectionAllowed(boolean flag)
|
void | setSelectionModel(ListSelectionModel newModel)
Sets the selection model for this TableColumnModel to newModel and registers with for listner notifications from the new selection model. |
void | valueChanged(ListSelectionEvent e)
|
Methods inherited from class java.lang.Object | |
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait |
Field Detail |
protected java.util.Vector tableColumns
protected ListSelectionModel selectionModel
protected int columnMargin
protected EventListenerList listenerList
protected transient ChangeEvent changeEvent
protected boolean columnSelectionAllowed
protected int totalColumnWidth
Constructor Detail |
public DefaultTableColumnModel()
Method Detail |
public void addColumn(TableColumn aColumn)
column
- The TableColumn to be addedpublic void removeColumn(TableColumn column)
column
- The TableColumn to be removedpublic void moveColumn(int columnIndex, int newIndex)
columnIndex
- the index of column to be moved
newIndex
- New index to move the columnpublic void setColumnMargin(int newMargin)
newMargin
- the width margin of the columnpublic int getColumnCount()
public java.util.Enumeration getColumns()
public int getColumnIndex(java.lang.Object identifier)
identifier
- the identifier objectpublic TableColumn getColumn(int columnIndex)
columnIndex
- the index of the column desiredpublic int getColumnMargin()
public int getColumnIndexAtX(int xPosition)
public int getTotalColumnWidth()
public void setSelectionModel(ListSelectionModel newModel)
newModel
- the new selection modelpublic ListSelectionModel getSelectionModel()
public void setColumnSelectionAllowed(boolean flag)
public boolean getColumnSelectionAllowed()
public int[] getSelectedColumns()
public int getSelectedColumnCount()
public void addColumnModelListener(TableColumnModelListener x)
public void removeColumnModelListener(TableColumnModelListener x)
protected void fireColumnAdded(TableColumnModelEvent e)
protected void fireColumnRemoved(TableColumnModelEvent e)
protected void fireColumnMoved(TableColumnModelEvent e)
protected void fireColumnSelectionChanged(ListSelectionEvent e)
protected void fireColumnMarginChanged()
public void propertyChange(java.beans.PropertyChangeEvent evt)
public void valueChanged(ListSelectionEvent e)
protected ListSelectionModel createSelectionModel()
protected void recalcWidthCache()
Overview | Package | Class | Tree | Deprecated | Index | Help |
Java Platform 1.1.7 |
||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |